Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format HH:MM:SS
HH = hours, padded to 2 digits, range: 00 - 99
MM = minutes, padded to 2 digits, range: 00 - 59
SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59)
寫一個可把數字轉換成時間的函式,並可接受最大數字為 35999
回傳時間格式: HH:MM:SS
(ns HumanTime)
(defn human-readable
[x]
(let [h (quot x 3600)
m (rem (quot x 60) 60)
s (rem x 60)]
(format "%02d:%02d:%02d" h m s))
)